<template>
    <div>
      <textarea id="app-textarea"></textarea>
      <el-button type="primary" size="default" @click="submit">提交</el-button>
    </div>
  </template>
  
  <script>
  export default {
    methods: {
      initEdit() {
        tinymce.init({
          selector: "textarea#app-textarea",
          branding: false,
          height: 600,
          plugins: "advlist link image lists paste", // 使用插件
          paste_data_images: true, // 支持图片粘贴
        });
      },
      submit() {
        // 获取编辑器内的数据
        console.log(tinymce.activeEditor.getContent());
      },
    },
    mounted() {
      this.initEdit();
    },
  };
  </script>
  
  <style></style>
  